{{--  --}}

@extends('default.layouts.posts')

{{-- META标题、关键词、描述等 --}}
@section('title')
文章列表@endsection

@section('keywords')
Wang123.net @endsection

@section('sidebar')
    @parent

    <div class="list-group">
        <a class="list-group-item active"> 分类 Category </a>
        @foreach ($categoryList as $rows)
            <a class="list-group-item" href="/posts/category-{{ $rows['category_name_en'] }}">
                <strong> {{ $rows['category_name'] }} </strong>
                <span class="badge">{{ isset($categoryCount[$rows['category_name_en']]) ? $categoryCount[$rows['category_name_en']] : '' }}</span>
            </a>
        @endforeach
    </div>

@endsection

@section('content')

    <ol class="breadcrumb">
      <li><a href="/">首页</a></li>
      <li><a href="/posts" class="active">文章列表</a></li>
    </ol>

    @if ($detailData)
    <div class="panel panel-default">
          <div class="panel-heading">
                <a href="/posts/detail-{{ $detailData['id'] }}.html"> {{ $detailData['title'] }} </a>
          </div>
          <div class="panel-body">
                
                {!! $detailData['content'] !!}
                <hr />
                <p> Last updated: {{ $detailData['created_at'] }}<p>

          </div>
    </div>
    @endif


@endsection